import axios from "../axios";
import qs from "qs";
import config from "../config.js";
import axiosDel from "axios";

let customUrl = {
	MONITOR_RAIN:"/mobile/api/monitor/line/rain",  //降水
	MONITOR_REO:"/mobile/api/monitor/line/reservoir", //水库
	MONITOR_PIPE:"/mobile/api/monitor/line/pipe",  //管网
	MONITOR_RIVER:"/mobile/api/monitor/line/river", //河道
	MONITOR_WATER:"/mobile/api/monitor/line/seeper"  //积水
};

//监测--通用 --曲线
export const lineCustom = json => {
	return axios({
		url: customUrl[json.type]+`?code=${json.code}&sd=${json.sd}&ed=${json.ed}`,
		method: "get"
	});
};

//监测--降水
export const monitorRain = json => {
	return axios({
		url: `/mobile/api/monitor/rain`,
		method: "get"
	});
};

//监测--来水
export const monitorSw = json => {
	return axios({
		url: `/mobile/api/monitor/sw`,
		method: "get"
	});
};

//监测--来水 --监测曲线
export const lineSw = json => {
	return axios({
		url: `/mobile/api/monitor/line/lsv1?code=${json.code}`,
		method: "get"
	});
};

//监测--河道
export const monitorRiver = json => {
	return axios({
		url: `/mobile/api/monitor/river`,
		method: "get"
	});
};

//监测--水库
export const monitorRreservoir = json => {
	return axios({
		url: `/mobile/api/monitor/reservoir`,
		method: "get"
	});
};
//监测--管网
export const monitorPipe = json => {
	return axios({
		url: `/mobile/api/monitor/pipe`,
		method: "get"
	});
};
//监测--积水
export const monitorWater = json => {
	return axios({
		url: `/mobile/api/monitor/water`,
		method: "get"
	});
};

//任务管理列表  
export const taskList = json => {
	return axios({
		url: `/mobile/api/task/list`,
		method: "get"
	});
};

//任务管理 详情  
export const taskDetail = json => {
	return axios({
		url: `/mobile/api/task/detail?id=${json.id}`,
		method: "get"
	});
};


